<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>轮播图片管理</title>
    <link rel="stylesheet" href="../plugins/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../public/css/app.css" media="all" />
    <link rel="stylesheet" href="../public/css/doc.css" media="all">
    <link rel="stylesheet" href="../public/css/message.css" media="all">
    <link rel="stylesheet" href="../public/css/nprogress.css" media="all">
    <style>
    	.layui-table-body div{
    		_height:200px; 
			min-height:50px;
			line-height:50px;
    	}
    	.layui-table-body .layui-table-cell .layui-form-checkbox .layui-icon {
    		 margin-top:15px 
    	}
    </style>
</head>

<body>
	<div class="kit-doc" style="padding:10px;">
   		<blockquote class="layui-elem-quote layui-text">轮播图片管理</blockquote>
    </div>
    <div class="kit-table" style="margin-left:10px;margin-right:10px;">
	    <form class="layui-form" lay-filter="kit-search-form">
	        <div class="kit-table-header">
	            <div class="kit-search-btns">
	            	<a href="javascript:;" data-action="add" class="layui-btn layui-btn-small"><i class="layui-icon">&#xe608;</i> 新增</a>
	                <a href="javascript:;" data-action="del-bulk" class="layui-btn layui-btn-small layui-btn-danger"><i class="layui-icon">&#xe640;</i> 批量删除</a>
	            </div>
	        </div>
	    </form>
	    <div class="kit-table-body">
	        <table id="demo" lay-filter="demo"></table>
	        <script type="text/html" id="barDemo">
            	<a class="layui-btn layui-btn-mini" lay-event="edit">编辑</a>
            	<a class="layui-btn layui-btn-danger layui-btn-mini" lay-event="del">删除</a>
        	</script>
	    </div>
	</div>
	
	<script type="text/html" id="imgtpl">
		{{#  if(d.homepagepic != null&&d.homepagepic != ""){ }}
  			<div class="my-table-height"><img src="{{d.homepagepic}}" width="100" height="50"/></div>
		{{#  } else { }}
			<div class="my-table-height">
		{{#  } }}
	</script>
	
	<script type="text/html" id="edit-tpl">
    	<div style="margin:10px">
        	<div class="layui-form" action="" lay-filter="form-edit">
				{{# if(d.id!=""){}}
					<input type="hidden" id="id" name="id" value="{{d.id}}" />
				{{#};}}
				<input type="hidden" id="imgflg"/>
            	<div class="layui-form-item">
                	<label class="layui-form-label">排序</label>
                	<div class="layui-input-block">
                    	<input id="code" type="text" name="code" required lay-verify="required" value="{{d.code}}" placeholder="请填写序号" autocomplete="off" class="layui-input">
                	</div>
            	</div>
				<div class="layui-form-item">
                	<label class="layui-form-label">图片</label>
						<div class="layui-upload">
  							<button type="button" class="layui-btn" id="imgButton"><i class="layui-icon">&#xe681;</i>选择图片</button>
						</div> 
            	</div>
				<div class="layui-form-item">
					<label class="layui-form-label"></label>
						<div class="layui-upload-list">
								{{# if(d.homepagepic!=null&&d.homepagepic!=""){}}
									<img class="layui-upload-img" id="img" width="200" height="130" src="{{d.homepagepic}}">
								{{# }else{}}
									<img class="layui-upload-img" id="img" width="200" height="130">
								{{# }}}
  						</div>
            	</div>
				<div class="layui-form-item">
    				<label class="layui-form-label">跳转链接</label>
    				<div class="layui-input-block">
                    	<input id="url" type="text" name="url" required lay-verify="required" value="{{d.url}}" placeholder="请填写链接" autocomplete="off" class="layui-input">
                	</div>
  				</div>
            	<div class="layui-form-item" style="display:none;">
                	<div class="layui-input-block">
                    	<button id="formEdit" class="layui-btn" lay-submit lay-filter="formEdit">立即提交</button>
                    	<button type="reset" class="layui-btn layui-btn-primary">重置</button>
                	</div>
            	</div>
        	</div>
    	</div>
	</script>
    <script src="../plugins/vue/vue.min.js"></script>
    <script src="../plugins/layui/layui.js"></script>
    <script src="./js/homepic.js"></script>
</body>

</html>